//
//  CXHAdMobNativeExpressAdView.h
//  CXHAdSDK-Google
//
//  Created by 陈坤 on 2025/5/25.
//

#import <Foundation/Foundation.h>
#import <GoogleMobileAds/GoogleMobileAds.h>
#if __has_include(<CXHAdSDK-Adapter/CXHAdSDKAdapter.h>)
#import <CXHAdSDK-Adapter/CXHAdSDKAdapter.h>
#else
#import "CXHAdSDKAdapter.h"
#endif

NS_ASSUME_NONNULL_BEGIN

@protocol CXHAdMobNativeExpressAdViewDelegate;

@interface CXHAdMobNativeExpressAdView : GADNativeAdView<CXHAdapterNativeExpressAdViewDelegate>

- (instancetype)initWithFrame:(CGRect)frame expressType:(CXHAdapterNativeExpressType)expressType nativeAd:(GADNativeAd *)adData;

@property (nonatomic, strong) CXHAdapterCommonReportMark *mark;

@property (nonatomic, assign) NSInteger countDown;

/// [必填] 开发者需传入用来弹出目标页的ViewController，一般为当前ViewController
@property (nonatomic, weak) UIViewController *currentViewController;

@property (nonatomic, weak) id<CXHAdMobNativeExpressAdViewDelegate> delegate;

@end

@protocol CXHAdMobNativeExpressAdViewDelegate <NSObject>

- (void)admobNativeExpressAdViewRenderFailed:(CXHAdMobNativeExpressAdView *)adView error:(NSError *)error;

- (void)admobNativeExpressAdViewRenderSuccess:(CXHAdMobNativeExpressAdView *)adView;

- (void)admobNativeExpressAdViewExpose:(CXHAdMobNativeExpressAdView *)adView;

- (void)admobNativeExpressAdViewClick:(CXHAdMobNativeExpressAdView *)adView ldp:(NSString *)ldp;

- (void)admobNativeExpressAdViewClose:(CXHAdMobNativeExpressAdView *)adView;

- (void)admobNativeExpressAdViewCloseLandingPageView:(CXHAdMobNativeExpressAdView *)adView;

@end

NS_ASSUME_NONNULL_END
